import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
let router = new VueRouter({
	routes: [
		{
			path: '/',
			name: 'root',
			redirect: '/home'
		},
		{
			path: '/home',
			name: 'home',
			component: () => import('@/pages/home'),
			children: [
			]
		},
		{
			path: '/list',
			name: 'list',
			component: () => import('@/pages/list'),
			children: [
			]
		},
		{
			path: '/detail',
			name: 'detail',
			component: () => import('@/pages/detail'),
			children: [
			]
		},
		{
			path: '/mine',
			name: 'mine',
			component: () => import('@/pages/mine'),
			redirect:'/mine/h',
			children: [
				{
					path:'/mine/h',
					name:'mineHome',
					component:()=>import('@/pages/mineChildren/home'),
					children:[]
				},
				{
					path:'/mine/ol',
					name:'mineOrderList',
					component:()=>import('@/pages/mineChildren/orderList'),
					children:[]
				},
				{
					path:'/mine/ro',
					name:'mineRechargeOnline',
					component:()=>import('@/pages/mineChildren/rechargeOnline'),
					children:[]
				}
			]
		},
		{
			path: '/login',
			name: 'login',
			component: () => import('@/pages/login'),
			children: [
			]
		},
		{
			path: '/*',
			name: '404',
			component: () => import('@/pages/notFound')
		},

	]
})

export default router;
